package com.cloudcc.mobile.util;

import android.content.Context;
import android.content.Intent;
import android.net.Uri;

/** 
* @Description: 系统相关 比如打电话等 
* @author wangzhiqiang
* @date 2015-11-25 下午1:54:58 
*  
*/
public class SystemUtils {

	
	
	
	
	/** 打电话
	 * @param context
	 * @param mobileNumber
	 */
	public static void sendCall(Context context,String mobileNumber){
		String tel="tel:"+mobileNumber;
		Uri uri=Uri.parse(tel);
		Intent intent=new Intent(Intent.ACTION_CALL,uri);
		context.startActivity(intent); 
	}
	/** 发送短信
	 * @param context
	 * @param mobileNumber
	 */
	public static void sendSms(Context context,String mobileNumber){
		 Uri smsToUri = Uri.parse("smsto:");
		 Intent sendIntent = new Intent(Intent.ACTION_VIEW, smsToUri);
		 sendIntent.putExtra("address",mobileNumber); //电话号码，这行去掉的话，默认就没有电话
		 sendIntent.setType("vnd.android-dir/mms-sms");
		 context.startActivity(sendIntent);
	}
	/** 发邮件
	 * @param context
	 * @param emailAddress
	 */
	public static void sendEmail(Context context,String emailAddress){
		Uri smsToUri = Uri.parse("mailto:"+emailAddress);
		Intent sendIntent = new Intent(Intent.ACTION_SENDTO, smsToUri);
		context.startActivity(sendIntent);
	}
	
	
	
}
